package com.premierleaguestats.server;

import java.util.ArrayList;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.premierleaguestats.client.SeasonGames;
import com.premierleaguestats.client.StatsService;
import com.premierleaguestats.client.TeamStatsData;

@SuppressWarnings("serial")
public class StatsServiceImpl extends RemoteServiceServlet implements StatsService{

	private static DatabaseManager dbManager = new DatabaseManager();
	
	public ArrayList<TeamStatsData> getDb(String teamName){

		System.out.println("statsServiceImpl");
		ArrayList<TeamStatsData> result = dbManager.getSeasonPosition(teamName);
		return result;
	}

	@Override
	public SeasonGames getSeasonGames(String teamName, String season) {

		System.out.println("statsServiceImpl Getseasongames");
		SeasonGames result = dbManager.getSeasonGames(teamName, season);
		return result;
	}
}
